﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NENAData.Factory;
using NENAData.LINQ;

namespace NENAData.NENAProvinces
{
    public class AffiliateDirectors
    {
        private static MembershipDataContext GetMembershipDB()
        {
            var x = new SQLMembership();
            return x.GetMembershipDB();
        }
        public  Directors_Provincal GetDirectors_byAffiliateID(int intAffiliate)
        {

            MembershipDataContext db = GetMembershipDB();
            var listAffilates = (from dp in db.Directors_Provincals
                                 where dp.Affiliate_ID == intAffiliate
                                 select dp).FirstOrDefault();

            return listAffilates;
        }
    }
}
